<?php 
# Inclusion des  classes de gestion
require('../../../conf/database.conf.php');
require('../../../class/sys/database.class.php');
include_once "../../../class/app/categorieList.class.php";
include_once "../../../class/app/cityList.class.php";



/* ========= Villes ========= */
$term = trim(strip_tags($_GET['term']));

$villeList = new CityList();
foreach($villeList->getCityList("-1", $term) as $laVille){
	$row["label"] = $laVille->getLabelCity()." (".$laVille->getCpCity().")";
	$row["id"] = $laVille->getIdCity();
	$row_set[] = $row;
}


echo json_encode($row_set);// retourne l'array au format JSON


?>